@extends('home.layout.layout')@section('tittle','个人中心')
@section('css')
  <link rel="stylesheet" type="text/css" href="{{asset('/HomeCss/css/common.css')}}"/>
  <link rel="stylesheet" type="text/css" href="{{asset('/HomeCss/css/index.css')}}">
  <link rel="stylesheet" type="text/css" href="{{asset('/HomeCss/css/ucenter.css')}}">
    <style type="text/css">
    
    caption, th, td {
        font-weight: 600;
        text-align: center;
        vertical-align: middle;
        font-size:14px;
        word-break:break-all; word-wrap:break-word;
        border:1px solid #999;
    }
    .pagination{            
      display: table;
      margin:40px auto;        
      }        
    .pagination > li{            
      display: table-cell;            
      }        
    .pagination li a{            
      text-decoration: none;            
      padding: 5px 8px;            
      background-color: #ddd;            
      color: #000;            
      margin-right: 1px;        
      }        
    .pagination li a:hover{            
        background-color: #ffcc00;
        color: #fff;        
      }
    </style>
@endsection
@section('con')
    
	<div class="ucenter">
    <div class="leftnnav">
    <dl>
        <dt>订单中心</dt>
        <dd><a href="/order/lists" title="我的订单">我的订单</a></dd>
        <dd><a href="/order/lists/c" title="评价晒单">评价晒单</a></dd>
    </dl>
    <dl>
        <dt>个人中心</dt>
        <dd><a href="/installment/index" title="我的好乐买分期">我的好乐买分期</a></dd>
        <dd><a href="{{asset('/home/collect/index')}}" title="我的收藏">我的收藏</a></dd>
        <dd><a href="/member/mycoupon" title="我的优惠券">我的优惠券</a></dd>
        <dd><a href="/member/integral" title="我的积分">我的积分</a></dd>
        <dd><a href="/memberaddress/address" title="收货地址管理">收货地址管理</a></dd>
        <dd><a href="/member/realname_identify" title="实名认证">实名认证</a></dd>
                    <dd><a href="{{asset('/home/umessage/index')}}" title="账号安全">账号安全</a></dd>
                <dd><a href="/inbox/index" title="我的消息">我的消息</a></dd>
    </dl>
    <dl>
        <dt>客户服务</dt>
        <dd><a href="{{asset('/home/umessage/member')}}" title="用户反馈">用户反馈</a></dd>
        <dd><a href="{{asset('/home/umessage/liuyan')}}" class='cur' title="查看反馈">查看反馈</a></dd>
    </dl>
</div>
    <div class="rMain" style="min-height:599px;">
    	@if(session('error'))
    		{{session('error')}}
    	@endif
			<div class="rmainTitle">
				<h3>建议列表</h3>
			</div>
		
				
          <table class="table" style="border:1px solid #ddd;width:900px;height=300px;table-layout:fixed"> 
           <thead> 
            <tr role="row">
             <th>留言id</th>
             <th>留言内容</th>
             <th>留言类型</th>
             <th>留言时间</th>
             <th>操作</th>
            </tr> 
           </thead> 
           <tbody> 
            @foreach($liuyan as $k=>$v)
            <tr class="gradeA odd" role="row" style="height:auto"> 
             <td class="sorting_1">{{$v->id}}</td>
             <td class="center">{{$v->jianyi}}</td> 
             <td class="center">@if($v->type == 2) 优化建议 @elseif($v->type == 3) 订单支付 @elseif($v->type == 4) 物流配送 @elseif($v->type == 5) 退换货办理 @elseif($v->type == 1) 其他 @endif</td> 
             <td class="center">{{$v->regtime}}</td> 
             <td class="center"><button class="btn btn-danger delete">删除</button>
            </tr>
            @endforeach
            
            
           </tbody> 
          </table>
          <div class="row">
            {!! $liuyan->appends($list)->render() !!}
          </div>
         </div>
      
</div>		
			
			</div>
		</div>

</div>




@endsection
@section('js')
    <script type="text/javascript">
  
        //绑定单击事件
        $('.delete').click(function(){
            if(!confirm('是否删除')){return}
            var id = $(this).parents('tr').find('.sorting_1').html();
            var btn = $(this);
            //发送ajax
            $.get('/home/umessage/delete',{id:id},function(data){
                if(data == 1){
                    //删除成功
                    btn.parents('tr').remove(); 
                    alert('删除成功');
                }else{
                    //删除失败
                    alert('删除失败');
                }
            });
        })
    </script>
    <script type="text/javascript" src="{{asset('/HomeCss/js/topslide.js')}}"></script>
    <!-- <script type="text/javascript" src="{{asset('/HomeCss/js/jquery.topsuggest.js')}}"></script> -->
    <script type="text/javascript" src="{{asset('/HomeCss/js/scrolltotop.js')}}"></script>
    <script type="text/javascript" src="{{asset('/HomeCss/js/timer.js')}}"></script>
    <!-- <script type="text/javascript" src="{{asset('/HomeCss/js/index.js')}}"></script> -->
    <script type="text/javascript" src="{{asset('/HomeCss/js/traffic.js')}}" async></script>
    <script type="text/javascript" src="{{asset('/HomeCss/js/jquery-1.8.3.min.js')}}"></script>
@endsection